package com.rockcent.mall.lib.domain;

import com.rockcent.common.domain.IDEntityMall;
import com.rockcent.mall.lib.domain.enumclass.MarketMerchantCooperationStatus;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;

/**
 * Created by HK on 16/9/5.
 *
 * 商家合作的关系 记录
 */
@Entity
@Table(name = "market_merchant_cooperation_record")
@DynamicInsert
@DynamicUpdate
public class MarketMerchantCooperationRecord extends IDEntityMall {

    @Column(columnDefinition = "bigint comment '供应商 平台id'")
    private Long supplierMallId;
    @Column(columnDefinition = "bigint comment '供应商 id'")
    private Long supplierMerchantId;
    @Column(columnDefinition = "varchar(30) comment '供应商 名称'")
    private String supplierMerchantName;
    @Column(columnDefinition = "varchar(255) comment '供应商 简介'")
    private String supplierMerchantIntro;
    @Column(columnDefinition = "varchar(30) comment '供应商 联系人名称'")
    private String supplierUserInfoRealName;
    @Column(columnDefinition = "varchar(11) comment '供应商 手机号码'")
    private String supplierUserInfoMobile;
    @Column(columnDefinition = "varchar(50) comment '供应商 邮箱'")
    private String supplierUserInfoEmail;
    @Column(columnDefinition = "bigint comment '分销商 平台id'")
    private Long distributorMallId;
    @Column(columnDefinition = "bigint comment '分销商 id'")
    private Long distributorMerchantId;
    @Column(columnDefinition = "varchar(30) comment '分销商 名称'")
    private String distributorMerchantName;
    @Column(columnDefinition = "varchar(255) comment '分销商 简介'")
    private String distributorMerchantIntro;
    @Column(columnDefinition = "varchar(30) comment '分销商 联系人名称'")
    private String distributorUserInfoRealName;
    @Column(columnDefinition = "varchar(11) comment '分销商 手机号码'")
    private String distributorUserInfoMobile;
    @Column(columnDefinition = "varchar(50) comment '分销商 邮箱'")
    private String distributorUserInfoEmail;
    @Column(columnDefinition = "varchar(30) comment '状态 WAIT(\"待审核\"), PASS(\"审核通过\")'")
    @Enumerated(EnumType.STRING)
    private MarketMerchantCooperationStatus status;

    public static final String CHECK_TYPE_IS_NOT_NULL = "type 不能为空";
    public static final String CHECK_TYPE_ALLOW = "type 只允许 SUPPLIER(\"供应商\"), DISTRIBUTOR(\"分销商\")";
    public static final String CHECK_STATUS_IS_NOT_NULL = "status 不能为空";
    public static final String CHECK_STATUS_ALLOW = "status 只允许 WAIT(\"待审核\"), PASS(\"审核通过\"),REFUSE(\"拒绝\")";
    public static final String CHECK_SUPPLIER_MERCHANT_ID_IS_NOT_NULL = "supplierMerchantId 不能为空";


    public Long getSupplierMerchantId() {
        return supplierMerchantId;
    }

    public void setSupplierMerchantId(Long supplierMerchantId) {
        this.supplierMerchantId = supplierMerchantId;
    }

    public Long getDistributorMerchantId() {
        return distributorMerchantId;
    }

    public void setDistributorMerchantId(Long distributorMerchantId) {
        this.distributorMerchantId = distributorMerchantId;
    }

    public MarketMerchantCooperationStatus getStatus() {
        return status;
    }

    public void setStatus(MarketMerchantCooperationStatus status) {
        this.status = status;
    }

    public String getSupplierMerchantName() {
        return supplierMerchantName;
    }

    public void setSupplierMerchantName(String supplierMerchantName) {
        this.supplierMerchantName = supplierMerchantName;
    }

    public String getSupplierMerchantIntro() {
        return supplierMerchantIntro;
    }

    public void setSupplierMerchantIntro(String supplierMerchantIntro) {
        this.supplierMerchantIntro = supplierMerchantIntro;
    }

    public String getSupplierUserInfoRealName() {
        return supplierUserInfoRealName;
    }

    public void setSupplierUserInfoRealName(String supplierUserInfoRealName) {
        this.supplierUserInfoRealName = supplierUserInfoRealName;
    }

    public String getSupplierUserInfoMobile() {
        return supplierUserInfoMobile;
    }

    public void setSupplierUserInfoMobile(String supplierUserInfoMobile) {
        this.supplierUserInfoMobile = supplierUserInfoMobile;
    }

    public String getSupplierUserInfoEmail() {
        return supplierUserInfoEmail;
    }

    public void setSupplierUserInfoEmail(String supplierUserInfoEmail) {
        this.supplierUserInfoEmail = supplierUserInfoEmail;
    }

    public String getDistributorMerchantName() {
        return distributorMerchantName;
    }

    public void setDistributorMerchantName(String distributorMerchantName) {
        this.distributorMerchantName = distributorMerchantName;
    }

    public Long getSupplierMallId() {
        return supplierMallId;
    }

    public void setSupplierMallId(Long supplierMallId) {
        this.supplierMallId = supplierMallId;
    }

    public Long getDistributorMallId() {
        return distributorMallId;
    }

    public void setDistributorMallId(Long distributorMallId) {
        this.distributorMallId = distributorMallId;
    }

    public String getDistributorMerchantIntro() {
        return distributorMerchantIntro;
    }

    public void setDistributorMerchantIntro(String distributorMerchantIntro) {
        this.distributorMerchantIntro = distributorMerchantIntro;
    }

    public String getDistributorUserInfoRealName() {
        return distributorUserInfoRealName;
    }

    public void setDistributorUserInfoRealName(String distributorUserInfoRealName) {
        this.distributorUserInfoRealName = distributorUserInfoRealName;
    }

    public String getDistributorUserInfoMobile() {
        return distributorUserInfoMobile;
    }

    public void setDistributorUserInfoMobile(String distributorUserInfoMobile) {
        this.distributorUserInfoMobile = distributorUserInfoMobile;
    }

    public String getDistributorUserInfoEmail() {
        return distributorUserInfoEmail;
    }

    public void setDistributorUserInfoEmail(String distributorUserInfoEmail) {
        this.distributorUserInfoEmail = distributorUserInfoEmail;
    }

    @Override
    public String toString() {
        return "MarketMerchantCooperationRecord{" +
                "supplierMallId=" + supplierMallId +
                ", id=" + id +
                ", supplierMerchantId=" + supplierMerchantId +
                ", dateCreated=" + dateCreated +
                ", supplierMerchantName='" + supplierMerchantName + '\'' +
                ", lastUpdated=" + lastUpdated +
                ", supplierMerchantIntro='" + supplierMerchantIntro + '\'' +
                ", supplierUserInfoRealName='" + supplierUserInfoRealName + '\'' +
                ", isDelete=" + isDelete +
                ", supplierUserInfoMobile='" + supplierUserInfoMobile + '\'' +
                ", version=" + version +
                ", supplierUserInfoEmail='" + supplierUserInfoEmail + '\'' +
                ", distributorMallId=" + distributorMallId +
                ", distributorMerchantId=" + distributorMerchantId +
                ", distributorMerchantName='" + distributorMerchantName + '\'' +
                ", distributorMerchantIntro='" + distributorMerchantIntro + '\'' +
                ", distributorUserInfoRealName='" + distributorUserInfoRealName + '\'' +
                ", distributorUserInfoMobile='" + distributorUserInfoMobile + '\'' +
                ", distributorUserInfoEmail='" + distributorUserInfoEmail + '\'' +
                ", status=" + status +
                '}';
    }
}
